import React, { useState } from 'react'
import { Button } from 'antd';
import "./classLook.less"
export default function ClassLook(props) {
    let { close, xcon } = props
    console.log();
    return (
        <div className='class_classLook'>
            <div>
                <p className='classLookTitle' style={{ display: (xcon.campus === 'wbj' ? "block" : 'none') }}>{xcon.campus === 'wbj' ? "北京校区 网站工程学院" : null}</p>
                <p className='classLookTitle' style={{ display: (xcon.campus === 'wbd' ? "block" : 'none') }}>{xcon.campus === 'wbd' ? "保定校区 网站工程学院" : null}</p>
                <p className='classLookTitle' style={{ display: (xcon.campus === 'jbd' ? "block" : 'none') }}>{xcon.campus === 'jbd' ? "保定校区 计算机学院" : null}</p>
                <p className='classLookTitle' style={{ display: (xcon.campus === 'jbj' ? "block" : 'none') }}>{xcon.campus === 'jbj' ? "北京校区 计算机学院" : null}</p>
                <p className='classLookTitle' style={{ display: (xcon.campus === 'rbd' ? "block" : 'none') }}>{xcon.campus === 'rbd' ? "保定校区 人工智能学院" : null}</p>
                <p className='classLookTitle' style={{ display: (xcon.campus === 'cbd' ? "block" : 'none') }}>{xcon.campus === 'cbd' ? "保定校区 传媒学院" : null}</p>
                <p>
                    <span>教室：{xcon.classroom}教室</span>，<span>可以容纳{xcon.galleryful}人</span>
                </p>
                <p>
                    <span>桌子：{xcon.desks}张</span>&nbsp;&nbsp;&nbsp;&nbsp;<span>椅子：{xcon.chairs}把</span>
                </p>
                <div className='alreadyOwned'>
                    <p>其他已有物品：</p>
                    <div className='clear'>
                        {
                            JSON.parse(xcon.property).map((item, index) => {
                                if (item.isFlag) {
                                    return <p className='pp_det' key={index}>{item.det}</p>
                                }
                            }
                            )
                        }
                    </div>
                </div>
            </div>
            <div className="but">
                <Button type="primary" onClick={close}>确定</Button>
            </div>
        </div >
    )
}
